<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="__PUBLIC__/dist/css/bootstrap.min.css" rel="stylesheet"/>

<link rel="stylesheet" href="__PUBLIC__/yksui/css/zui.css" rel="stylesheet"/>
<!------timedate css+js-->

<div>
    <form style="margin:20px 30px;" id="transForm">
        <input  class="form-control"  type="hidden" name="id" value="{$transDetail['id']}"/>
        <table class="table table-bordered">
            <tr>
                <td>物流计划单号</td>
                <td><input type="text" class="form-control"  name="transport_plan_code" value="{$transDetail['transport_plan_code']}"
                           disabled/></td>
            </tr>
            <tr>
                <td>物流追踪码</td>
                <td><input type="text"  class="form-control"  name="certificate_code" value="{$transDetail['certificate_code']}"/></td>
            </tr>
            <tr>
                <td>承运商服务</td>
                <td><input type="text"  class="form-control"  name="carrier_service_name" value="{$carrier_service[$transDetail['carrier_service_id']]}"/></td>
                <input type="hidden"  name="carrier_service_id" value="{$transDetail['carrier_service_id']}"/>
            </tr>
            <tr>
                <td>预计提货时间</td>
                <td><input type="text"  class="form-control   layer-date" onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
                           name="expected_pickup_time"
                           value="<?php if ($transDetail['expected_pickup_time']>0) {echo $transDetail['expected_pickup_time'];}?>"/></td>
            </tr>
        </table>
        <div id="sub" class="btn" style="margin-left:48%; padding:8px 30px;"><b>标记发货</b></div>
        <input type="hidden" name="transport_plan_code" id="transport_plan_code"
               value="{$transDetail['transport_plan_code']}"/>
    </form>
</div>


<script type="text/javascript" src="__PUBLIC__/javascripts/admin/jquery-1.10.2.min.js"></script>
<script src="__PUBLIC__/yksui/js/zui.js"></script>

<!--日期-->
<!--<script type="text/javascript" src="__PUBLIC__/yksui/lib/datetimepicker/datetimepicker.min.js"></script>-->
<script type="text/javascript" src="__PUBLIC__/yksui/lib/laydate/laydate.js"></script>
<!--常用-->
<script type="text/javascript" defer src="__PUBLIC__/yksui/js/admin.js"></script>
<!--<script type="text/javascript" src="__PUBLIC__/javascripts/admin/WdatePicker.js"></script>-->
<script type="text/javascript" src="__PUBLIC__/javascripts/admin/layer/layer.js"></script>
<script type="application/javascript">
    $(function () {
        $("#sub").on('click', function () {
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            //alert($('#transForm').serialize());
            layer.load();
            $.ajax({
                url: "{:U('Transportplan/ajaxMarkShip')}",
                type: 'post',
                async: true, //default: true
                data: $('#transForm').serialize(),
                dataType: 'json', // default: Intelligent Guess (xml, json, script, or html)
                success: function (data, textStatus, jqXHR) {
                    if (data == '修改成功') {
                        parent.location.reload();
                        parent.layer.close(index); //执行关闭
                    }
                    layer.closeAll('loading');
                    alert(data);
                }
            })
        })
    })
</script>